<!doctype html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>缤格</title>
    <link rel="stylesheet" type="text/css" href="../../css/api.css" />
    <link rel="stylesheet" type="text/css" href="../../css/style.css" />
    <link rel="stylesheet" type="text/css" href="../../css/swiper.min.css" />
    <link rel="stylesheet" type="text/css" href="../../css/common.css" />
    <link rel="stylesheet" type="text/css" href="../../css/binge.css" />
    <script type="text/javascript" src="../../script/jquery-1.9.1.min.js"></script>
    <script type="text/javascript" src="../../script/swiper.min.js"></script>
    <script type="text/javascript" src="../../script/mobile.js"></script>

    <script type="text/javascript">
        window['adaptive'].desinWidth = 750;
        window['adaptive'].baseFont = 28;
        window['adaptive'].maxWidth = 750;
        window['adaptive'].init();
    </script>
</head>

<body>
<!-- header -->
<div id="header" style="height: 1rem; background: #fff; position: fixed; top: 0;left: 0; width: 100%; z-index: 99">
    <div class="header" style="margin-bottom: 0;">
        <div class="head-back">
            <a href="javascript:void(0);" tapmode onclick="comeBack()" class="back-btn"></a>
        </div>
        <div class="head-title">
            <h6>我的圈子</h6>
        </div>
        <!--<div class="head-action">-->
            <!--<a href="javascript:void(0);" tapmode onclick="commonUrl('follow_school')" class="action-btn"></a>-->
        <!--</div>-->
    </div>
</div>
<!-- header end -->
<div class="header-h" style="padding-top: 1.5rem;"></div>
<!-- choose circle -->
<div class="choose-circle-kinds" style="padding-bottom: 1.4rem; border-top: none;">
    <div class="choose-circle-list my-circle-list" style="width: 100%">
        <ul id="myCircle">
            <!--<li class="circle-link" tapmode onclick="commonUrl('circle_index')">
                <div class="circle-img"><img src="../../image/school-icon.png" alt=""></div>
                <p class="multiline-ellipsis">娱乐娱乐娱乐</p>
            </li>-->

            <!--<li class="load-more">
                <div class="circle-more"></div>
                <p class="multiline-ellipsis">更多</p>
            </li>-->
        </ul>
    </div>
    <div class="common-fixed-bottom">
        <a href="javascript:void(0);" tapmode onclick="commonUrl('circle_all')" class="fixed-bottom">关注更多</a>
    </div>
</div>
<!-- choose circle end -->



</body>
</html>
<script type="text/javascript" src="../../script/api.js"></script>
<script type="text/javascript" src="../../script/common.js"></script>
<script type="text/javascript">
    apiready = function() {

        setFixStatusBar(); //设置状态栏
        pop.loading()
        keybackListener()
        /*//下拉刷新
        dropDownRefresh(function () {
            getMyCircleList(1);
        });*/

        getMyCircleList(1);
    }

    function getMyCircleList(type) {
        var param = {
            token: $api.getStorage('token'),
            type: type,//类型：1关注 2推荐
        }
        getAjax(Interface.circle_follows, param, function (res) {
            var data = res.data;

            if(isDefine(data)){
                var listHtml = '';
                //我关注的圈子列表
                for (var m = 0; m < data.length; m++) {
                    var circle_id = {"circle_id": data[m].id};
                    listHtml += '<li class="circle-link" tapmode onclick=\'commonUrl("circle_index",'+jsonChange(circle_id)+')\'>' +
                        '                <div class="circle-img bg-cover" style="background: url('+ajaxUrl+data[m].icon_path+')"></div>' +
                        '                <p class="multiline-ellipsis">'+data[m].title+'</p>' +
                        '            </li>';
                }
                $("#myCircle").html(listHtml);
            }else {
                $("#myCircle").html(noData);
            }
            pop.close()
        },function (error) {
            $("#myCircle").html(noData);
            pop.notice(error.msg)
            pop.close()
        })
    }



</script>
